﻿namespace NExplorer.AddIns.Samples
{
	public class SampleAddIn : IAddIn
	{
		private readonly SampleMenuBuilder			_menuBuilder = new SampleMenuBuilder();
		private readonly FolderSizeColumnProvider	_folderSizeColumnProvider = new FolderSizeColumnProvider();

		public string Name
		{
			get { return "Sample AddIn"; }
		}

		public string Description
		{
			get { return "Demonstrates common scenarios"; }
		}

		public void Initialize()
		{
			ServiceManager.MenuBuilderManager.AddMenuBuilder(_menuBuilder);
			ServiceManager.ColumnProviderManager.AddColumnProvider(_folderSizeColumnProvider);
		}

		public void Unload()
		{
			ServiceManager.MenuBuilderManager.RemoveMenuBuilder(_menuBuilder);
			ServiceManager.ColumnProviderManager.RemoveColumnProvider(_folderSizeColumnProvider);
		}
	}
}